//
//  PKNetworkUtils.swift
//  Panku
//
//  Created by mac on 2017/2/7.
//  Copyright © 2017年 Monster. All rights reserved.
//

import UIKit
import ReactiveCocoa
import ReactiveSwift
import Result
import Alamofire

enum PKHTTPMethod: String {
    case options = "OPTIONS"
    case get     = "GET"
    case head    = "HEAD"
    case post    = "POST"
    case put     = "PUT"
    case patch   = "PATCH"
    case delete  = "DELETE"
    case trace   = "TRACE"
    case connect = "CONNECT"
}

//网络模块抽象基类
protocol PKNetworkUtils {
    
    //网络请求方法 该方法必须要重写
    func request(url:String,method:PKHTTPMethod,parameters:[String: Any]?,headers: [String:String]?) -> SignalProducer<Any,NSError>
    
    // factory
    static func make() -> PKNetworkUtils
}

